package com.littlec.sdk.entity.messagebody;

import java.io.File;

import android.os.Parcel;
import android.os.Parcelable;

public class ImageMessageBody extends FileMessageBody implements Parcelable {
	private String middleUri;
	private String smallUri;
	private int width;
	private int height;
	public static final Parcelable.Creator<ImageMessageBody> CREATOR = new Parcelable.Creator() {
		public ImageMessageBody createFromParcel(Parcel paramAnonymousParcel) {
			return new ImageMessageBody(paramAnonymousParcel);
		}

		public ImageMessageBody[] newArray(int paramAnonymousInt) {
			return new ImageMessageBody[paramAnonymousInt];
		}
	};

	private ImageMessageBody(Parcel paramParcel) {
		this.localPath = paramParcel.readString();
		this.fileName = paramParcel.readString();
		this.fileLength = paramParcel.readLong();
		this.originalUri = paramParcel.readString();
		this.middleUri = paramParcel.readString();
		this.smallUri = paramParcel.readString();
		this.width = paramParcel.readInt();
		this.height = paramParcel.readInt();
	}

	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(this.localPath);
		dest.writeString(this.fileName);
		dest.writeLong(this.fileLength);
		dest.writeString(this.originalUri);
		dest.writeString(this.middleUri);
		dest.writeString(this.smallUri);
		dest.writeInt(this.width);
		dest.writeInt(this.height);
	}

	public ImageMessageBody(File paramFile) {
		if (paramFile != null) {
			this.localPath = paramFile.getAbsolutePath();
			this.fileName = paramFile.getName();
			this.fileLength = paramFile.length();
		}
	}

	public ImageMessageBody(String fileName, String originalUri,
			String middleUri, String smallUri) {
		this.fileName = fileName;
		this.originalUri = originalUri;
		this.middleUri = middleUri;
		this.smallUri = smallUri;
	}

	public int getWidth() {
		return this.width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return this.height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public String getMiddleUri() {
		return this.middleUri;
	}

	public void setMiddleUri(String middleUri) {
		this.middleUri = middleUri;
	}

	public String getSmallUri() {
		return this.smallUri;
	}

	public void setSmallUri(String smallUri) {
		this.smallUri = smallUri;
	}

	public int describeContents() {
		return 0;
	}

	public String getContent() {
		return getLocalPath();
	}
}
